import board
import digitalio
import time

class LED:
    def __init__(self,pin):
        self.led = digitalio.DigitalInOut(pin)
        self.led.direction = digitalio.Direction.OUTPUT
        self.led.value=False
    def write(self,value):
        self.led.value=value
    def deinit(self):
        self.led.value=False
        self.led.deinit()

red=LED(board.GPIO37)
yellow=LED(board.GPIO36)
green=LED(board.GPIO38)
blue=LED(board.GPIO40)

red.write(True)
time.sleep(1)
yellow.write(True)
time.sleep(1)
green.write(True)
time.sleep(1)
blue.write(True)
time.sleep(1)

red.deinit()
yellow.deinit()
green.deinit()
blue.deinit()
